package com.mimiwang.school.service.impl;

import com.mimiwang.school.domain.SchoolCampus;
import com.mimiwang.school.mapper.SchoolCampusMapper;
import com.mimiwang.school.service.ISchoolCampusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 校区Service业务层处理
 * 
 * @author ylb
 * @date 2023-04-16
 */
@Service
public class SchoolCampusServiceImpl implements ISchoolCampusService
{
    @Autowired
    private SchoolCampusMapper schoolCampusMapper;



    @Override
    public SchoolCampus selectCampusById(long id) {
        return schoolCampusMapper.selectSchoolCampusById(id);
    }

    @Override
    public List<SchoolCampus> selectCampusListBySchoolId(long schoolId) {
        return schoolCampusMapper.selectCampusListBySchoolId(schoolId);
    }


    /**
     * 新增校区
     * 
     * @param schoolCampus 校区
     * @return 结果
     */
    @Override
    public int insertSchoolCampus(SchoolCampus schoolCampus)
    {
        return schoolCampusMapper.insertSchoolCampus(schoolCampus);
    }

    /**
     * 修改校区
     * 
     * @param schoolCampus 校区
     * @return 结果
     */
    @Override
    public int updateSchoolCampus(SchoolCampus schoolCampus)
    {
        return schoolCampusMapper.updateSchoolCampus(schoolCampus);
    }

    /**
     * 批量删除校区
     * 
     * @param ids 需要删除的校区主键
     * @return 结果
     */
    @Override
    public int deleteSchoolCampusByIds(Long[] ids)
    {
        return schoolCampusMapper.deleteSchoolCampusByIds(ids);
    }

    /**
     * 删除校区信息
     * 
     * @param id 校区主键
     * @return 结果
     */
    @Override
    public int deleteSchoolCampusById(Long id)
    {
        return schoolCampusMapper.deleteSchoolCampusById(id);
    }
}
